home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / texts / hsc.lha / hsc / src_docs / features / strftime.txt < prev    next >
Text File  |  1996-01-14  |  4KB  |  133 lines

  1. STRFTIME(3)                UNIX Programmer's Manual                STRFTIME(3)
  2.  
  3. NAAMMEE
  4.      ssttrrffttiimmee - format date and time
  5.  
  6. SSYYNOOPPSSIISS
  7.      ##iincclluuddee <<ssyyss//ttyyppeess..hh>>
  8.      ##iincclluuddee <<ttiimmee..hh>>
  9.      ##iincclluuddee <<ssttrriingg..hh>>
  10.  
  11.      size_t
  12.      ssttrrffttiimmee(char *buf, size_t maxsize, const char *format,
  13.              const struct tm *timeptr)
  14.  
  15. DDEESSCCRRIIPPTTIIOON
  16.      The ssttrrffttiimmee() function formats the information from timeptr into the
  17.      buffer buf according to the string pointed to by format.
  18.  
  19.      The format string consists of zero or more conversion specifications and
  20.      ordinary characters.  All ordinary characters are copied directly into
  21.      the buffer.  A conversion specification consists of a percent sign
  22.      ```%''' and one other character.
  23.  
  24.      No more than maxsize characters will be placed into the array.  If the
  25.      total number of resulting characters, including the terminating null
  26.      character, is not more than maxsize, ssttrrffttiimmee() returns the number of
  27.      characters in the array, not counting the terminating null.  Otherwise,
  28.      zero is returned.
  29.  
  30.      Each conversion specification is replaced by the characters as follows
  31.      which are then copied into the buffer.
  32.  
  33.      %%AA    is replaced by the full weekday name.
  34.  
  35.      %%aa    is replaced by the abbreviated weekday name, where the abbreviation
  36.            is the first three characters.
  37.  
  38.      %%BB    is replaced by the full month name.
  39.  
  40.      %%bb oorr %%hh
  41.            is replaced by the abbreviated month name, where the abbreviation
  42.            is the first three characters.
  43.  
  44.      %%CC    is equivalent to ``%a %b %e %H:%M:%S %Y'' (the format produced by
  45.            asctime(3).
  46.  
  47.      %%cc    is equivalent to ``%m/%d/%y''.
  48.  
  49.      %%DD    is replaced by the date in the format ```mm/dd/yy'''.
  50.  
  51.      %%dd    is replaced by the day of the month as a decimal number (01­31).
  52.  
  53.      %%ee    is replaced by the day of month as a decimal number (1­31); single
  54.            digits are preceded by a blank.
  55.  
  56.      %%HH    is replaced by the hour (24­hour clock) as a decimal number
  57.            (00­23).
  58.  
  59.      %%II    is replaced by the hour (12­hour clock) as a decimal number
  60.            (01­12).
  61.  
  62.      %%jj    is replaced by the day of the year as a decimal number (001­366).
  63.  
  64.      %%kk    is replaced by the hour (24­hour clock) as a decimal number (0­23);
  65.  
  66.            single digits are preceded by a blank.
  67.  
  68.      %%ll    is replaced by the hour (12­hour clock) as a decimal number (1­12);
  69.            single digits are preceded by a blank.
  70.  
  71.      %%MM    is replaced by the minute as a decimal number (00­59).
  72.  
  73.      %%mm    is replaced by the month as a decimal number (01­12).
  74.  
  75.      %%n    is replaced by a newline.
  76.  
  77.      %%pp    is replaced by either ``AM'' or ``PM'' as appropriate.
  78.  
  79.      %%RR    is equivalent to ``%H:%M''
  80.  
  81.      %%rr    is equivalent to ``%I:%M:%S %p''.
  82.  
  83.      %%tt    is replaced by a tab.
  84.  
  85.      %%SS    is replaced by the second as a decimal number (00­60).
  86.  
  87.      %%ss    is replaced by the number of seconds since the Epoch, UCT (see
  88.            mktime(3)).
  89.  
  90.      %%TT or %%XX
  91.            is equivalent to ``%H:%M:%S''.
  92.  
  93.      %%UU    is replaced by the week number of the year (Sunday as the first day
  94.            of the week) as a decimal number (00­53).
  95.  
  96.      %%WW    is replaced by the week number of the year (Monday as the first day
  97.            of the week) as a decimal number (00­53).
  98.  
  99.      %%ww    is replaced by the weekday (Sunday as the first day of the week) as
  100.            a decimal number (0­6).
  101.  
  102.      %%xx    is equivalent to ``%m/%d/%y %H:%M:%S''.
  103.  
  104.      %%YY    is replaced by the year with century as a decimal number.
  105.  
  106.      %%yy    is replaced by the year without century as a decimal number
  107.            (00­99).
  108.  
  109.      %%ZZ    is replaced by the time zone name.
  110.  
  111.      %%%%    is replaced by `%'.
  112.  
  113. SSEEEE AALLSSOO
  114.      date(1),  ctime(3),  printf(1),  printf(3)
  115.  
  116. SSTTAANDDAARRDDSS
  117.      The ssttrrffttiimmee() function conforms to ANSI C3.159­1989 (``ANSI C''). The
  118.      `%s' conversion specification is an extension.
  119.  
  120. BBUUGGSS
  121.      There is no conversion specification for the phase of the moon.
  122.  
  123. BSD Experimental                 June 29, 1991                               2
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.